package cn.wyl.pet;

import cn.wyl.PetHomeApp;
import cn.wyl.pet.domain.Pet;
import cn.wyl.pet.domain.PetType;
import cn.wyl.pet.mapper.PetMapper;
import cn.wyl.pet.query.PetQuery;
import cn.wyl.user.mapper.LogininfoMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.management.Query;
import java.util.List;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = PetHomeApp.class)
public class pettest {
    @Autowired
    private PetMapper mapper;

    @Test
    public void test() throws Exception{
        /*List<Menu> menus = mapper.loadMenusByLogininfoId(348l);
        menus.forEach(System.out::println);*/
        PetQuery query = new PetQuery();
        query.setCurrentPage(1);
        query.setPageSize(20);
        query.setShopId(36l);

        List<Pet> pets = mapper.queryData(query);
        pets.forEach(System.out::println);
    }
}
